package com.colin.project.mapper;

import com.colin.project.bean.HeadImg;
import com.colin.project.bean.User;
import org.springframework.stereotype.Repository;

import java.sql.Timestamp;

@Repository
public interface UserMapper {
    Integer selectIdByUsername(String username);

    Boolean insertUser(User user);

    Integer selectIdByEmail(String email);

    Boolean updatePasswordByEmail(String email, String finalPassword);

    User selectUserByUsernameAndPassword(String username, String password);

    void updateLastLoginTime(Timestamp currentTime, String username);

    HeadImg selectDefaultHeadImg(String defaultHeadImgId);

    void updateHeadImgById(Integer id, String mappingPath);

    void updateUserById(User user);

    User selectUserById(Integer id);
}
